package com.appkubes.fintech.restful.config;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * @Author: Rongjie
 * @Date: 2020/2/23
 * @Description:
 */
@Configuration
public class MybatisConfig {
    @Resource
    SqlSessionFactory sqlSessionFactory;

    @Bean
    SqlSessionTemplate sqlSessionTemplate() {
        SqlSessionTemplate template = new SqlSessionTemplate(sqlSessionFactory);
        return template;
    }
}
